﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class System_UserAdd : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void SubmitBtn_Click(object sender, EventArgs e)
    {
        string userStr = "INSERT INTO tb_user(username, password) "
                       + "VALUES(@username, @password);";
        Dictionary<string, string> param = new Dictionary<string, string>();
        param.Add("@username", UserName.Text);
        param.Add("@password", Password.Text);
        int result = DBControl.Operate(userStr, param);
        if (result > 0) {
            Response.Redirect("~/Default.aspx");
        }
    }
    protected void ReturnBtn_Click(object sender, EventArgs e)
    {
        Response.Redirect("~/Default.aspx");
    }
}